<div class="box-header with-border">
    <h3 class="box-title">提现设置</h3>
    <!-- /.box-tools -->
</div>
<!-- /.box-header -->

<form role="form" onsubmit="return sub_setting_6()">
    <div class="box-body">
        <div class="form-group">
            <label for="withdrawals_fee">提现手续费</label>
            <input type="text" class="form-control" value="{$sys['withdrawals_fee']}" id="withdrawals_fee" placeholder="提现手续费">
        </div>
        <div class="form-group">
            <label for="lowest_money">最低提现金额</label>
            <input type="text" class="form-control" value="{$sys['lowest_money']}" id="lowest_money" placeholder="最低提现金额">
        </div>
        <div class="form-group">
            <label for="highest_money">最大提现金额</label>
            <input type="text" class="form-control" value="{$sys['highest_money']}" id="highest_money" placeholder="最大提现金额">
        </div>
        <div class="form-group">
            <label for="max_extract_count">每日提现次数</label>
            <input type="text" class="form-control" value="{$sys['max_extract_count']}" id="max_extract_count" placeholder="每日提现次数">
        </div>
    </div>
    <!-- /.box-body -->

    <div class="box-footer">
        <button type="submit" class="btn btn-primary">保存</button>
    </div>
</form>

<script>
    function sub_setting_6(){
        var withdrawals_fee = $("#withdrawals_fee").val();
        if (withdrawals_fee == "") {
            $.scojs_message("提现手续费不能为空", $.scojs_message.TYPE_ERROR);
            return false;
        }
        var lowest_money = $("#lowest_money").val();
        if (lowest_money ==  "") {
            $.scojs_message("最低提现金额不能为空", $.scojs_message.TYPE_ERROR);
            return false;
        }
        var highest_money = $("#highest_money").val();
        if (highest_money ==  "") {
            $.scojs_message("最大提现金额不能为空", $.scojs_message.TYPE_ERROR);
            return false;
        }
        var max_extract_count = $("#max_extract_count").val();
        if (max_extract_count ==  "") {
            $.scojs_message("每日提现次数不能为空", $.scojs_message.TYPE_ERROR);
            return false;
        }
        $.ajax({
            type:"POST",
            url : '__ADMIN__/'+moduleName+'/setting',
            dataType:"json",
            data:{
                id:1,
                withdrawals_fee:withdrawals_fee,
                lowest_money:lowest_money,
                highest_money:highest_money,
                max_extract_count:max_extract_count
            },
            beforeSend:showLoad,
            success:function(msg) {
                if (msg.code == 0)
                    $.scojs_message(msg.msg, $.scojs_message.TYPE_OK);
                else
                    $.scojs_message(msg.msg, $.scojs_message.TYPE_ERROR);
                hideLoad();
            }
        });

        return false;
    }
</script>